package cn.smart.epic.core.log;

import cn.smart.epic.core.util.SpringContextHolder;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import org.springframework.web.context.WebApplicationContext;

import java.io.Serializable;

/**
 * @Auther Uncle_Z
 * @date 2017/9/29 22:42
 * @Email:2545375@qq.com
 * @Descrition 被修改的bean临时存放的地方
 * @since 1.0
 */

@Component
@Scope(scopeName = WebApplicationContext.SCOPE_SESSION)
public class LogObjectHolder implements Serializable {

    private Object object = null;

    public Object getObject() {
        return object;
    }

    public void setObject(Object object) {
        this.object = object;
    }

    public static LogObjectHolder me() {
        LogObjectHolder bean = SpringContextHolder.getBean(LogObjectHolder.class);
        return bean;
    }
}
